 function WxSDK ({
  title = '',
  desc = '',
  link = '',
  imgUrl = ''
}) {
  return new Promise((resolve, reject) => {
    wx.onMenuShareAppMessage({
      title: title,
      desc: desc,
      link: link,
      imgUrl: imgUrl,
      success: resolve,
      fail: reject
    })

    // “分享到朋友圈”
    wx.onMenuShareTimeline({
      title: title,
      link: link,
      imgUrl: imgUrl,
      success: resolve,
      fail: reject
    })

    // 分享到QQ
    wx.onMenuShareQQ({
      title: title,
      desc: desc,
      link: link,
      imgUrl: imgUrl,
      success: resolve,
      fail: reject
    })

    // 分享到腾讯微博
    wx.onMenuShareWeibo({
      title: title,
      desc: desc,
      link: link,
      imgUrl: imgUrl,
      success: resolve,
      fail: reject
    })

    // 分享到QQ空间
    wx.onMenuShareQZone({
      title: title,
      desc: desc,
      link: link,
      imgUrl: imgUrl,
      success: resolve,
      fail: reject
    })
  })
}
 export {WxSDK}
